
from redis import StrictRedis

class Config(object):
    DEBUG = None
    SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@localhost/python6"
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    REDIS_HOST = "127.0.0.1"
    REDIS_PORT = 6379
    SECRET_KEY = 'JfqhApfTNHFJbeRnxNtkC330B4Yp4Vyo1d74lKh19mX6NlqbgsVvrw=='
    SESSION_TYPE = "redis"
    SESSION_REDIS = StrictRedis(host=REDIS_HOST, port=REDIS_PORT)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400


class developmentConfig(Config):
    DEBUG = True

class productionConfig(Config):
    DEBUG = False

config = {
    "development": developmentConfig,
    "production": productionConfig
}
